package com.treasure.mall.biz.repository.log;

import com.treasure.mall.biz.base.JpaSearchableRepository;
import com.treasure.mall.biz.entity.log.UserChangeLogPO;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author wm
 */
@Repository
public interface UserChangeLogRepository extends JpaSearchableRepository<UserChangeLogPO, Integer> {
    @Query("select a from UserChangeLogPO a where a.user.userId=?1 order by a.logId desc")
    List<UserChangeLogPO> findAllByUserIdOrderByLogIdDesc(Integer userId);
}